import React, { useState } from 'react';
import Modal from './Modal';
import Message from './Toast';

export default function ModalBox(props) {
  const [visible, setVisible] = useState(false);
  const BulletFrame = () => {
    setVisible(true);
  };
  const handleOk = () => {
    setVisible(false);
  };
  const handleCancel = () => {
    setVisible(false);
  };
  const BulletToast = () => {
    // Toast.aaa(12);
    Message.success();
    // console.log(message.success().props);
    // console.log(Toast);
  };
  return (
    <>
      <Modal title="标题gasg" visible={visible} onOk={handleOk} onCancel={handleCancel}>
        <p>1qwerqwerqw</p>
        <p>4qwerqwer</p>
        <p>7qewrqwer9</p>
      </Modal>
      <button onClick={BulletFrame}>弹出对话框</button>
      <button onClick={BulletToast}>弹出对话框</button>
    </>
  );
}
